In order to save the bandwidth required for speech and audio signal transmission and save the storage space required, the corresponding speech and audio coding technologies are applied widely. Currently, the speech and audio coding is categorized into lossy coding and lossless coding. The lossy coding and the lossless coding generally involve the Linear Prediction (LP) operation and the Long Term Prediction (LTP) operation. The LP operation is introduced to eliminate the short-term redundancy of the speech signals, and the LTP operation is introduced to further eliminate the long-term redundancy of the speech signals, and improve the compression efficiency. The LTP operation involves the operations such as pitch search, and is rather complicated.
A coding scheme that involves LP operation and LTP operation in the prior art is: performing LP operation and LTP operation for all input frame signals first; specifically, after completion of the LP operation, performing LTP operation for the LP residual signals to obtain the LTP prediction residual; after completion of the LTP operation, performing LTP decision according to the LP residual and the LTP prediction residual, setting the value of LTP flag (LTPFlag) according to the LTP decision result and output the value; if LTPFlag=1, performing the entropy coding on the LP residual signal and the LTP residual signal and outputting; if LTPFlag=0, performing the entropy coding on the LP residual signal and outputting.
The inventor of the present disclosure finds in the prior art that: The LTP operation is effectively primarily on the voiced signals. In a practical conversation, the silence and unvoiced signals account for 60% or more. Therefore, the coding based on the prior art performs the LTP operation for all input frame signals, which reduces the coding efficiency and increases the coding complexity.